package com.beiding.service.email;

import com.beiding.pojo.manager.Application;
import org.springframework.security.core.GrantedAuthority;

public interface EmailService {

    void checkCode(String email, String code);

    void sendCode(String email);

    void sendRetrievePassword(String email, String username);

    void invalidateCode(String code);

    String getUsernameByToken(String token);

    void invalidateToken(String token);

    void sendApplyForManager(String email, String username, GrantedAuthority authority, String text);

    Application getApplication(String token);

    void send(String email, String topic, String text);
}
